<?php

namespace Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * UserInCrew
 *
 * @ORM\Table(name="user_in_crew")
 * @ORM\Entity
 */
class UserInCrew
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="bigint", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    protected $id;

    /**
     * @var string
     *
     * @ORM\Column(name="role", type="string", length=45, nullable=false)
     */
    protected $role;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="applied_on", type="datetime", nullable=true)
     */
    protected $appliedOn;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="approved_on", type="datetime", nullable=true)
     */
    protected $approvedOn;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="last_modified", type="datetime", nullable=false)
     */
    protected $lastModified;

    /**
     * @var \Entity\Crew
     *
     * @ORM\ManyToOne(targetEntity="Entity\Crew")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="crew_id", referencedColumnName="id")
     * })
     */
    protected $crew;

    /**
     * @var \Entity\User
     *
     * @ORM\ManyToOne(targetEntity="Entity\User")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="user_id", referencedColumnName="id")
     * })
     */
    protected $user;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set role
     *
     * @param string $role
     * @return UserInCrew
     */
    public function setRole($role)
    {
        $this->role = $role;
    
        return $this;
    }

    /**
     * Get role
     *
     * @return string 
     */
    public function getRole()
    {
        return $this->role;
    }

    /**
     * Set appliedOn
     *
     * @param \DateTime $appliedOn
     * @return UserInCrew
     */
    public function setAppliedOn($appliedOn)
    {
        $this->appliedOn = $appliedOn;
    
        return $this;
    }

    /**
     * Get appliedOn
     *
     * @return \DateTime 
     */
    public function getAppliedOn()
    {
        return $this->appliedOn;
    }

    /**
     * Set approvedOn
     *
     * @param \DateTime $approvedOn
     * @return UserInCrew
     */
    public function setApprovedOn($approvedOn)
    {
        $this->approvedOn = $approvedOn;
    
        return $this;
    }

    /**
     * Get approvedOn
     *
     * @return \DateTime 
     */
    public function getApprovedOn()
    {
        return $this->approvedOn;
    }

    /**
     * Set lastModified
     *
     * @param \DateTime $lastModified
     * @return UserInCrew
     */
    public function setLastModified($lastModified)
    {
        $this->lastModified = $lastModified;
    
        return $this;
    }

    /**
     * Get lastModified
     *
     * @return \DateTime 
     */
    public function getLastModified()
    {
        return $this->lastModified;
    }

    /**
     * Set crew
     *
     * @param \Entity\Crew $crew
     * @return UserInCrew
     */
    public function setCrew(\Entity\Crew $crew = null)
    {
        $this->crew = $crew;
    
        return $this;
    }

    /**
     * Get crew
     *
     * @return \Entity\Crew 
     */
    public function getCrew()
    {
        return $this->crew;
    }

    /**
     * Set user
     *
     * @param \Entity\User $user
     * @return UserInCrew
     */
    public function setUser(\Entity\User $user = null)
    {
        $this->user = $user;
    
        return $this;
    }

    /**
     * Get user
     *
     * @return \Entity\User 
     */
    public function getUser()
    {
        return $this->user;
    }
}
